[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
INT 10h, 10h (16) Set Palette Registers PCjr, EGA
Sets the palette registers on the PS/2.
On entry: AH 10h
AL Subservice
0 - Set palette register
BL Palette register
BH Value to set
1 - Set overscan (border) color register
BH Value to set
2 - Set palette registers and border register
ES:DX Pointer to color list
3 - Toggle intensify/blinking bit
BL 0 - Enable intensify
BL 1 - Enable blinking
7 - Read Palette Register (VGA)
BL Palette register number
Returns:
BH Palette register contents
8 - Read Border Color Register (VGA)
Returns:
BH Border Color
9 - Read All Palette Registers (VGA)
ES:DX Address of a 17-byte table
Returns:
Contents of all 16 palette registers
and border color
10h - Update DAC Register (MCGA, VGA)
BX Color register number
DH Red color value
CH Green color value
CL Blue color value
12h - Update DAC Block (MCGA, VGA)
ES:DX Address of DAC Block
BX Number of first DAC to update
CX Number of DACs to update
13h - Set DAC Color Paging (VGA)
BH Color page to use
BL 1 . Use 64 DAC pages
0 . Use 16 DAC pages
15h - Read DAC Register (MCGA, VGA)
BX Color register number
Returns:
DH Red color value
CH Green color value
CL Blue color value
17h - Read Block of DAC Registers (MCGA, VGA)
ES:DX Address of data buffer
BX Number of first DAC to read
CX Number of DACs to read
Returns:
Fills buffer
1Ah - Get DAC Paging Status (VGA)
Returns:
BH Color page in use
BL 1 . Using 64 DAC pages
0 . Using 16 DAC pages
1Bh - Convert DACs to Grey (MCGA, VGA)
BX First DAC to convert to grey
CX Number of DACs to convert
Registers destroyed: AX, SP, BP, SI, DI
--------------------------------------------------------------------------
There are 16 palette registers on the EGA and PCjr displays and 1
overscan (border) register. This service gives the user control over
these registers. The four subservices are explained below.
Subservice 0 (Set Palette Register)
Each of the 16 palette registers can take on 1 of 64 values. the value
in BH is formatted as follows:
Bit 7 - Reserved
Bit 6 - Reserved
Bit 5 - Secondary Red
Bit 4 - Secondary Green
Bit 3 - Secondary Blue
Bit 2 - Red
Bit 1 - Green
Bit 0 - Blue
The secondary colors have an intensity of 1/3, while the normal colors
have an intensity of 2/3. For example, BH = 02h will produce green, BH
= 10h will produce a dim green, and BH = 12h will produce a bright
green.
The default values for the palette registers, which are the same as
the Color Graphics Adapter (CGA), are defined below:
--------------------------------------------------------------------------
Palette
Register Color value Color
00h 00h Black
01h 01h Blue
02h 02h Green
03h 03h Cyan
04h 04h Red
05h 05h Magenta
06h 14h Brown
07h 07h White
08h 38h Dark Gray
09h 39h Light Blue
0Ah 3Ah Light Green
0Bh 3Bh LIght Cyan
0Ch 3Ch Light Red
0Dh 3Dh Light Magenta
0Eh 3Eh Yellow
0Fh 3Fh Bright White
--------------------------------------------------------------------------
Subservice 1 (Set Overscan (Border) Register)
This subservice sets the border color. The Enhanced Color Display
supports overscan in 200-line modes only.
Subservice 2 (Set All Palette Registers and Overscan Register)
ES:DX points to a 17-byte color list, in which the first 16 bytes
consist of new values for the 16 palette registers and the last byte
is the new overscan register value.
Subservice 3 (Toggle intensify/blinking bit)
Normally bit 7 of the attribute byte is used to indicate foreground
blinking. With this subservice, bit 7 can indicate foreground blinking
(BL=1) or background intensity (BL=0).
Subservice 7 (Read Palette Register (VGA))
This subservice reads the color value in a palette register. Place the
number of the register to read in BL. The color value in that register is
returned in BH.
Subservice 8 (Read Border Color Register (VGA))
This service returns the color value of the current border in BH.
Subservice 9 (Read All Palette Registers (VGA))
You can read all palette registers, and the border color, at the same
time with subservice 9. Pass the address of a 17-byte data buffer in
ES:DX. INT 10h fills the buffer with the contents of the 16 palette
registers and the border color.
Subservice 10h (Update DAC Register (MCGA, VGA))
This subservice lets you update an individual DAC register. To use it,
place the number of the DAC register in BX, the new 6-bit red value in
DH, the 6-bit green value in CH, and the 6-bit blue value in CL.
Subservice 12h (Update DAC Block (MCGA, VGA))
You can also update a whole block of DACs. You have to set up a table of
RGB values (red, green, blue, red, green, blue...) corresponding to the
DACs, in order, that you want to update. Place the address of the table
in ES:DX, the number of the first DAC to update in BX, and the number of
DACs to update in CX.
Subservice 13h (Set DAC Color Paging (VGA))
This subservice lets you set up DAC paging in either pages of 16 or 64
DAC registers. Set BH to the DAC page number to use (0 origin), and BL to
the paging scheme code (1 . Use 64 DAC pages, 0 . Use 16 DAC pages).
Subservice 15h (Read DAC Register (MCGA, VGA))
Subservice 15h lets you read individual DAC registers. You pass it the
number of the register to read in BX. It returns the red color value in
DH, the green value in CH, and the blue value in CL.
Subservice 17h (Read Block of DAC Registers (MCGA, VGA))
This subservice lets you read a block of DAC registers and store their
contents in memory. Pass the address of a data buffer in ES:DX, the
number of the first register to read in BX, and the number of registers
to read in CX. INT 10h fills the buffer with the RGB (red, green, blue,
red, green, blue...) values from those registers.
Subservice 1Ah (Get DAC Paging Status (VGA))
You can determine the DAC paging status with this subservice. It returns
the DAC page number currently in use in BH and the paging scheme code in
BL (1 . 64 DAC pages, 0 . 16 DAC pages).
Subservice 1Bh (Convert DACs to Grey (MCGA, VGA))
You can convert a specified number of DACs to the corresponding grey tones
by using this subservice. Put the number of the first DAC to convert in BX
and the number of DACs to convert in CX.
See Also:
INT 10h, 0Bh
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson